
package Util;

/**
 *
 * @author henriquediomede
 */
public class Vertex 
{
    public Vertex()
    {
        coordinates = new float[3];
        reset();
        
    }
    
    final public void reset()
    {
        coordinates[0] = 0;
        coordinates[1] = 0;
        coordinates[2] = 0;
    }
    
    
    public void set(float x, float y, float z)
    {
        coordinates[0] = x;
        coordinates[1] = y;
        coordinates[2] = z;
    }
     
    
    final public float x()
    {
        return coordinates[0];
    }
    
    final public float y()
    {
        return coordinates[1];
    }
    
    final public float z()
    {
        return coordinates[2];
    }
    
    public void x(float x)
    {
        coordinates[0] = x;
    }
    
    public void y(float y)
    {
        coordinates[1] = y;
    }
    
    public void z(float z)
    {
        coordinates[2] = z;
    }
    
    public void printv()
    {
        System.out.println("<" + coordinates[0] + ", " + coordinates[1] + ", " + coordinates[2] + ">");
    }
    
    private float coordinates[];
}
